d<template>
	<div class="main_spac1 maincl">
		<div class="main_white padding10">
         <div class="main_crumbs boxdq">
          <div class="main_crumbs_l">
            <a href="javascript:;" @click="$router.back(-1)">
              <i class="el-icon-arrow-down"></i>返回
            </a>
            <em>|</em>
            <span>产品列表</span>
          </div>
        </div>

			<div class="main_table" style="min-height: 590px">
				<el-table
					ref="multipleTable"
					v-loading="listLoading"
					:data="list"
					element-loading-text="加载中"
					fit
					border
					highlight-current-row
				>

					<el-table-column
						label="ID"
						prop="id"
						:show-overflow-tooltip="true"
					/>

					<el-table-column
						label="产品名称"
						prop="name"
						:show-overflow-tooltip="true"
					></el-table-column>

					<el-table-column fixed="right" label="操作" width="150">
						<template slot-scope="scope">
							<div>
								<el-link @click="toMenu(scope.row.id)" type="warning">排除菜单</el-link>
							</div>
						</template>
					</el-table-column>
				</el-table>
			</div>
		</div>

	</div>
</template>

<script>
import { productByComId,} from "@/api/user/userList";

export default {
	data() {
		return {
			// 列表数据
			list: [],
			listLoading: false,
		};
	},
	mounted() {
		this.getData();
	},
	methods: {
		// 获取列表
		getData() {
			this.listLoading = true;
			let data = {company_id:this.$route.query.id};
			productByComId(data).then((res) => {
				this.listLoading = false;
				if (res.errcode == 0) {
					this.list = res.data.list;
					// this.userType = res.data.company_type_list;
					// this.totalCount = res.data.list.total;
				} else {
					this.$message.error(res.errmsg);
				}
			});
		},
		//排除菜单
		toMenu(id){
			this.$router.push({
            path:`/user/list/productMenu`,
            query:{product_id:id,company_id:this.$route.query.id}
         })
		},
	},
};
</script>
<style lang="scss" scoped>
@import "@/styles/variables.scss";
.maincl {
//   .el-select {
// 	 width: 114px;
//   }
  .more {
	 margin-left: 50px;
  }
  .handle_btn {
	 padding: 0;
	 border: 0;
  }
  .edit_dialog {
	 .address {
		max-width: 350px;
	 }
  }
	.mainor_form{
		text-align: right;
	}

  .main_table /deep/.el-table--small td {
	 padding: 10px 0;
  }
  .main_table /deep/.el-table--small th {
	 padding: 10px 0;
  }

  /deep/.el-table {
	 tr {
		&:hover {
		  background: none !important;
		}
		&.hover-row > td {
		  background: none !important;
		}
		.current-row > td {
		  background: none !important;
		}
	 }
  }
  /deep/.el-table .el-table__body tr:hover {
	 background: #fff !important;
  }
  /deep/.el-table .el-table__body tr:hover > td {
	 background: #fff !important;
  }
  /deep/.el-table tr.expanded + tr {
	 background: #fafafa !important;
  }
  /deep/.el-table tr.expanded + tr > td {
	 background: #fafafa !important;
  }
  /deep/.el-table tr.expanded + tr .mainex_ta {
	 background: #fafafa !important;
  }
  /deep/.el-table tr.expanded + tr .mainex_ta th,
  /deep/.el-table tr.expanded + tr .mainex_ta tr {
	 background: #fafafa !important;
  }
  /deep/.el-table tr.expanded + tr:hover {
	 background: #fafafa !important;
  }
  /deep/.el-table tr.expanded + tr:hover > td {
	 background: #fafafa !important;
  }
  /deep/.el-table tr.expanded + tr .el-table tr:hover {
	 background: #fafafa !important;
  }
  /deep/.el-table tr.expanded + tr .el-table tr:hover > td {
	 background: #fafafa !important;
  }
}
</style>
